import request from "@/request/index.js"

export function commit(items,addressId,payWay,remark,sendWay){
	let url = '/api/mall/order/commit'
	let data = {items,addressId,payWay,remark,sendWay}
	data.Loading = true 
	data.Json = true 
	return request.post(url,data)
}

export function cancel(orderId){
	let url = '/api/mall/order/cancel'
	let data  = {orderId}
	data.Loading = true 
	return request.post(url,data)
}

export function list(paid,status,page,limit){
	let url = '/api/mall/order/list'
	let params = {paid,status,page,limit}
	return request.get(url,{params})
}

export function info(id){
	let url = '/api/mall/order/info'
	let params = {id}
	return request.get(url,{params})
}

export function repay(orderId){
	let url = '/api/mall/order/repay'
	return request.post(url,{orderId,Loading:true})
}